package com.briup.estore.common.service;

import com.briup.estore.common.bean.Order;
import com.briup.estore.common.bean.User;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author adam
 * @date 2022/10/18
 */
public interface IOrderService {
    long  countOrder();

    Page<Order> findOrders(String query, String status, int pageSize, int pageNum) throws Exception;

    void updateOrder(Order order) throws Exception;

    Order findOrderById(String id) throws Exception;

    List<Order> findUserAllOrders(Long id);

    Order saveOrder(Long[] ids, User user, Long addressId);


    Order paySuccess(String orderId);
}
